lst = [1,2,3,4,5]*100
sunNum = 0
i = 0
while len(lst) > i:
    sunNum += lst[i]
    i += 1
print(sunNum)

def listsum(numlist):
    if len(numlist) == 1:
        return numlist[0]
    else:
        return numlist[0] + listsum(numlist[1:])

def toStr(n, base):
    convertString = "0123456789ABCDEF"
    if n < base:
        return convertString[n]
    else:
        return toStr(n//base, base) + convertString[n%base]


if __name__ == "__main__":
    print(listsum(lst))
    print(toStr(20,8), type(toStr(20,8)))
    import sys
    sys.getrecursionlimit(3000) # 调整递归深度